package com.hbpu.encap.exception_homework;

import java.util.Scanner;

public class Homework01 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (true) {
            System.out.print("请输入被除数和除数：");
            int n1 = scanner.nextInt();
            int n2 = scanner.nextInt();
            EcmDef(n1, n2);
            break;
        }
    }

    public static int EcmDef(int n1, int n2) {
        try {
            return n1 / n2;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
